package example;

import example.utils.JwtUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

@Slf4j
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Application.class, args);
        log.info(run.getEnvironment().getProperty("server.port"));
        log.info(" \n http://localhost:{}", run.getEnvironment().getProperty("server.port"));
    }

    /**
     * 密码加密
     *
     * @return
     */
//    @Bean
//    public BCryptPasswordEncoder passwordEncoder() {
//        return new BCryptPasswordEncoder();
//    }
    @Bean
    public JwtUtil getJwtUtil() {
        return new JwtUtil();
    }

}
